package com.ehotting.edsta.circuitDesign.domain;

import com.ehotting.edsta.circuitDesign.enums.SceneTypeEnum;
import com.ehotting.edsta.circuitDesign.enums.StateTypeEnum;
import com.ehotting.edsta.circuitDesign.gen.element.enums.ScriptTypeEnum;
import com.ehotting.eaf.core.annotation.Excel;
import com.ehotting.eaf.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;


/**
 * 脚本 es_script
 *
 * @author edsta
 * @date 2023-06-03
 */
public class EsRuleScript extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 脚本编号 */
    private Long id;

    /** 规则编号
     * SceneTypeEnum.FILTER_PARAM {@link EsCircuitCodeDataTemplate#getId()}
     * SceneTypeEnum.CIRCUIT_SELECT {@link EsCircuitType#getId()}
     * SceneTypeEnum.ELEMENT_SELECT {@link EsCircuit#getId()}
     * */
    @Excel(name = "场景编号")
    private Long sceneId;

    /** 规则编号 */
    @Excel(name = "场景类型")
    private SceneTypeEnum sceneType;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 脚本内容 */
    @Excel(name = "脚本内容")
    private String content;

    /** 脚本类型 */
    @Excel(name = "脚本类型")
    private ScriptTypeEnum type;

    /** 状态(1:可用0:不可用)*/
    @Excel(name = "状态(1:可用0:不可用)")
    private StateTypeEnum state;

    /** 插入时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "插入时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date insertTime;
    /** 序号 */
    @Excel(name = "序号")
    private Long priority;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getInsertTime() {
        return insertTime;
    }

    public void setInsertTime(Date insertTime) {
        this.insertTime = insertTime;
    }

    public Long getPriority() {
        return priority;
    }

    public void setPriority(Long priority) {
        this.priority = priority;
    }

    public Long getSceneId() {
        return sceneId;
    }

    public void setSceneId(Long sceneId) {
        this.sceneId = sceneId;
    }

    public SceneTypeEnum getSceneType() {
        return sceneType;
    }

    public void setSceneType(SceneTypeEnum sceneType) {
        this.sceneType = sceneType;
    }

    public ScriptTypeEnum getType() {
        return type;
    }

    public void setType(ScriptTypeEnum type) {
        this.type = type;
    }

    public StateTypeEnum getState() {
        return state;
    }

    public void setState(StateTypeEnum state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("sceneId", getSceneId())
            .append("name", getName())
            .append("content", getContent())
            .append("type", getType())
            .append("state", getState())
            .append("insertTime", getInsertTime())
            .append("priority", getPriority())
            .toString();
    }
}
